package com.iteaj.iboot.plugin.crawler.service;

import com.iteaj.framework.result.DetailResult;
import com.iteaj.framework.result.Result;
import com.iteaj.iboot.plugin.crawler.entity.SiteContent;
import com.iteaj.framework.IBaseService;
import com.iteaj.iboot.plugin.crawler.entity.SiteContentMedia;

import java.util.List;

/**
 * <p>
 * 采集的站点内容 服务类
 * </p>
 *
 * @author iteaj
 * @since 2024-10-05
 */
public interface ISiteContentService extends IBaseService<SiteContent> {

    DetailResult<SiteContent> getByPromotionId(String promotionId);

    void saveMedias(List<SiteContentMedia> medias);

    void updateMediaContent(String contentId, String string);

    void updateStatus(String promotionId, String status);

    void updateMediaStatus(Long contentMediaId, String localUrl, String status, String type);

    List<SiteContentMedia> listMediasByContentId(Long siteContentId);

    Result<SiteContent> detailById(Long id);

    Long countMedia(String contentId);

    void removeContentAndMedia(String contentId);

    void removeMedia(Long mediaId);

    void removeMediaByLocalUrlIsNull(String contentId);
}
